The enclosed is a demo/sample application for ColorSync 2.x. Among other things, it can open a pict file (which may have embedded profiles or profile identifiers), allow the user to choose source, output and display profiles, and convert the pict in several useful ways. The code is not fully polished or documented, so be prepared to find some bugs.
If you're looking for useful ColorSync routines in the code, here are the source files you should look at first:
1) colorsyncStuff.c -- This file contains some useful routines for dealing with profiles and picts with embedded profiles.
2) myDrawMatchedPicture -- This file contains a different implementation of NCMDrawMatchedPicture.
3) winProfile.c -- This code displays a Finder-like Get Info window for CS1 and CS2 profiles.
4) winProfID.c -- This code displays a Finder-like Get Info window for CS2.1 profile identifiers.
5) winProfList.c -- This code displays a scrollable list of profiles in the "ColorSync Profiles Folder"
I hope that this is of some assistance. If you have any more related questions or bug reports, please send a link to DEVSUPPORT.
Happy syncing,
David Hayward & Eric Broadbent
ColorSync Engineering Group
Apple Computer, Inc.
Modification History
Version 2.6d1 (3/99)
Updated sources to use latest headers and updated project to CodeWarror Pro 3. Did miscellaneous cleanups and additions to the shell code which means that now the user can drag & drop profiles.
Version 2.5d1 (3/98)
Added support for new features of ColorSync 2.5. Most noticable of these is changing winProfList.c to use the new CMIterateColorSyncFolder which is much faster than the old profile search routines. Added timing information to the Pict window. Updated projects to CodeWarror Pro 1. Did miscellaneous cleanups and additions to the shell code.
Version 1.1b2 (2/97)
IMPORTANT: I moved a popup in profile windows from Attributes[0] to Attributes[1]. According to the ICC Profile Spec and the latest revision of the ColorSync documentation, Attributes[1] is the correct location for the glossy/matte and reflective/transparent bits. The current CMICCProfile.h file is incorrect in this regard and many of the Apple monitor profiles make incorrect use of these same bits to hold white-point information. Also, in the profile windows, I added new ColorSync 2.1 bits to the Flags popup.
Updated projects to CodeWarror 11. Added support to copy picts to clipboard. Removed QuickDraw GX printing support. Did miscellaneous cleanups and additions to the shell code.
Version 1.1b1 (7/96)
Added support for new features of ColorSync 2.1. Did miscellaneous cleanups of the code and its comments.
Version 1.0b3 (9/95)
Factored code somewhat to improve the framework. Added Drag & drop support for pictures. Did miscellaneous cleanups of the code and its comments.
Version 1.0b2 (6/94)
Improved PrependProfileToPicHandle() so that it sets the embedded flag bit in the profile header before calling NCMUseProfileComment(). This is the proper thing to do in order to respect the copyright of the profile.
Changed to code used for GX printing so that if used the new GX interfaces. These new interfaces are on E.T.O. 18.
Did miscellaneous cleanups of the code and its comments.